package com.tt.fashionWebSite.dao.jpa;

import com.tt.fashionWebSite.dao.BinhLuanDao;
import com.tt.fashionWebSite.domain.BinhLuan;
import com.tt.fashionWebSite.domain.Luat;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository("binhLuan")
public class BinhLuanJpaDao extends GenericJpaDao<BinhLuan, String> implements BinhLuanDao {
    public BinhLuanJpaDao () {
        super(BinhLuan.class);
    }

    @Override
    public List<BinhLuan> getProductComment(){
        return getEntityManager().createNamedQuery(BinhLuan.GET_INFO_PRODUCTCOMMENT, BinhLuan.class).getResultList();
//        return getEntityManager().createNamedQuery(Luat.GET_INFO_LAWREASON, Luat.class)
//                .setParameter("patientId", "1")
//                .getResultList();
    }
}
